#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#     Filename @  ospathex.py
#       Author @  Huoty
#  Create date @  2015-06-18 11:13:09
#  Description @  
# *************************************************************

import os

# Script starts from here

for tmpdir in ("/tmp", r"c:\temp"):
    if os.path.isdir(tmpdir):
        break
    else:
        print "no temp directory available"
        tmpdir = ""

if tmpdir:
    os.chdir(tmpdir)
    cwd = os.getcwd()
    print "*** current temporary directory"
    print cwd

